package
{
	import flash.display.Graphics;
	import flash.geom.Matrix;

	public class Module
	{
		public var x:int;
		public var y:int;
		public var width:int;
		public var height:int;
		public var mapImage:MapImage;
		public var id:uint;
		public function Module()
		{
		}
		public function Draw(g:Graphics, x:int,y:int):void
		{
			if(mapImage.bitmapData != null)
			{
				var matrix:Matrix = new Matrix();
				matrix.translate(x - this.x, y - this.y);
				g.beginBitmapFill(mapImage.bitmapData,matrix);
				g.drawRect(x,y,width,height);
				g.endFill();
			}
			else
			{
				mapImage.Load();
			}
		}
		public function SetDisplayData(o:Object):void
		{
			
		}
	}
}